PKG_CONF=`pkg-config --cflags --libs libpanelapplet-2.0`

all:
	gcc $(PKG_CONF) -o acerwificontroller acerwificontroller.c

install:
	@cp -v acerwificontroller /usr/lib/gnome-panel/
	@cp -v AcerWifiController_Factory.server /usr/lib/bonobo/servers/
	@cp -v acerwificontroller_enable.sh /usr/local/bin/
	@cp -v acerwificontroller_disable.sh /usr/local/bin/
	@chmod -v +x /usr/local/bin/acerwificontroller_enable.sh
	@chmod -v +x /usr/local/bin/acerwificontroller_disable.sh
	

uninstall:
	@rm -v /usr/lib/bonobo/servers/AcerWifiController_Factory.server
	@rm -v /usr/lib/gnome-panel/acerwificontroller
	@rm -v /usr/local/bin/acerwificontroller_enable.sh
	@rm -v /usr/local/bin/acerwificontroller_disable.sh
	
clean:
	@rm -v -f *.out *.o acerwificontroller